package com.motorola.dp.jenkinsmonitor.service.util;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.ParseException;

/**
*
* Utility functions for Class conversion
*
*/
@SuppressWarnings({ "rawtypes" })
public interface ClassService {

    /**
    *
    * Converts a String into desired class
    *
    * @param s
    * @param c
    * @return class instance
    * @throws ParseException
    *
    */
    Object convertStringToClass(String s, Class c) throws ParseException;

    String getSetterName(Field f);

    String getGetterName(Field f);

    Method getSetterMethod(Field f, Class c) throws NoSuchMethodException;

    Method getGetterMethod(Field f, Class c) throws NoSuchMethodException;

    Object getFieldValue(Field field, Object object)
            throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;

}
